<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: BlockPyFeedback</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: BlockPyFeedback</h1>

    




<section>

<header>
    
        <h2>BlockPyFeedback</h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="BlockPyFeedback"><span class="type-signature"></span>new BlockPyFeedback<span class="signature">(main, tag)</span><span class="type-signature"></span></h4>

    



<div class="description">
    An object that manages the feedback area, where users are told the state of their
program's execution and given guidance. Also manages the creation of the Trace Table.
</div>







    <h5>This:</h5>
    <ul><li>{<a href="BlockPyFeedback.html">BlockPyFeedback</a>}</li></ul>



    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>main</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The main BlockPy instance</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tag</code></td>
            

            <td class="type">
            
                
<span class="param-type">HTMLElement</span>


            
            </td>

            

            

            <td class="description last">The HTML object this is attached to.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line10">line 10</a>
    </li></ul></dd>
    

    

    

    
</dl>
















    
    </div>

    

    

    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="buildTraceTable"><span class="type-signature"></span>buildTraceTable<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Reload the trace table, showing it if it was hidden and
resetting its position to the last step.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line30">line 30</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="clear"><span class="type-signature"></span>clear<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Clears any output currently in the feedback area. Also resets the printer and
any highlighted lines in the editor.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line53">line 53</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="clearEditorErrors"><span class="type-signature"></span>clearEditorErrors<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Clears any errors from the editor area.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line65">line 65</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="complete"><span class="type-signature"></span>complete<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Mark this problem as completed for the student. This will appear in the Feedback area,
and will also unhighlight lines in the editor and log to the server.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line95">line 95</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="editorError"><span class="type-signature"></span>editorError<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show an error message related to a problem with the editor. This will appear in
the Feedback area, the Printer, and also log to the server. The relevant line of
code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line80">line 80</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="emptyProgram"><span class="type-signature"></span>emptyProgram<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show "Empty Program" error, indicating the student hasn't written any code. This will appear in
the Feedback area, the Printer, and also log to the server. The relevant line of
code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line221">line 221</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="error"><span class="type-signature"></span>error<span class="signature">(html)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Raises a generic warning. This might not be used anymore.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>html</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">Some HTML content to render to the user.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line42">line 42</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="finished"><span class="type-signature"></span>finished<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Mark this problem as finished for the student. This will appear in the Feedback area,
and will also unhighlight lines in the editor and log to the server.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line108">line 108</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="instructorFeedback"><span class="type-signature"></span>instructorFeedback<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show an incorrect code message related to a problem as specified by the Checker. This will appear in
the Feedback area, the Printer, and also log to the server. The relevant line of
code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line201">line 201</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="internalError"><span class="type-signature"></span>internalError<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show an error message related to a serious internal BlockPy program. Under normal conditions,
this should never appear to a student. This will appear in
the Feedback area, the Printer, and also log to the server. The relevant line of
code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line182">line 182</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="noErrors"><span class="type-signature"></span>noErrors<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    This notifies the student that their code ran without errors, but that there was no
Success raised by the Checker. This will appear in the Feedback area,
and will also unhighlight lines in the editor and log to the server.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line122">line 122</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="prettyPrintError"><span class="type-signature"></span>prettyPrintError<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Converts any kind of error (usually a Skulpt one) into a prettier version that's ready
for users to see. If it's already a string, it is passed along unchanged. But Skulpt
errors have to be processed more closely.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line234">line 234</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="printError"><span class="type-signature"></span>printError<span class="signature">(error)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Print an error to the printers -- the on screen one and the browser one. This
will attempt to provide extra explanation and context for an error.
Notice that this is largely for Run-time errors that will be thrown when the code
is executed, as opposed to ones raised elsewhere in the environment.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>error</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The error message to be analyzed and printed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line255">line 255</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="semanticError"><span class="type-signature"></span>semanticError<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show an error message related to semantic error with the program (e.g., unused variable). 
This will appear in the Feedback area, the Printer, and also log to the server. The
relevant line of code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line160">line 160</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="syntaxError"><span class="type-signature"></span>syntaxError<span class="signature">(original, message, line)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Show an error message related to syntax issue. This will appear in
the Feedback area, the Printer, and also log to the server. The relevant line of
code or block will also be highlighted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>original</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that represents the original error message generated by the system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">HTML content that is a hopefully friendlier message for the user explaining the error.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">What line the error occurred on.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="feedback.js.html">feedback.js</a>, <a href="feedback.js.html#line140">line 140</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BlockPy.html">BlockPy</a></li><li><a href="BlockPyCorgis.html">BlockPyCorgis</a></li><li><a href="BlockPyDialog.html">BlockPyDialog</a></li><li><a href="BlockPyEditor.html">BlockPyEditor</a></li><li><a href="BlockPyEngine.html">BlockPyEngine</a></li><li><a href="BlockPyEnglish.html">BlockPyEnglish</a></li><li><a href="BlockPyFeedback.html">BlockPyFeedback</a></li><li><a href="BlockPyHistory.html">BlockPyHistory</a></li><li><a href="BlockPyPresentation.html">BlockPyPresentation</a></li><li><a href="BlockPyPrinter.html">BlockPyPrinter</a></li><li><a href="BlockPyServer.html">BlockPyServer</a></li><li><a href="BlockPyToolbar.html">BlockPyToolbar</a></li><li><a href="LocalStorageWrapper.html">LocalStorageWrapper</a></li><li><a href="PythonToBlocks.html">PythonToBlocks</a></li></ul><h3>Global</h3><ul><li><a href="global.html#BlockPyInterface">BlockPyInterface</a></li><li><a href="global.html#cloneNode">cloneNode</a></li><li><a href="global.html#encodeHTML">encodeHTML</a></li><li><a href="global.html#expandArray">expandArray</a></li><li><a href="global.html#EXTENDED_ERROR_EXPLANATION">EXTENDED_ERROR_EXPLANATION</a></li><li><a href="global.html#indent">indent</a></li><li><a href="global.html#instructor_module">instructor_module</a></li><li><a href="global.html#prettyPrintDateTime">prettyPrintDateTime</a></li><li><a href="global.html#randomInteger">randomInteger</a></li><li><a href="global.html#set_button_loaded">set_button_loaded</a></li><li><a href="global.html#timerGuard">timerGuard</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sun Mar 26 2017 09:45:04 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>